#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>

#include "core.h"

#define UNUSED(x) (void)x

jmp_buf train_env;

int main(int argc, char *argv[])
{
    int ret = 0;
    menu_func_t p_menu_func[MENU_NUM];
    struct core *p_core = NULL;

    UNUSED(argc);
	UNUSED(argv);

    p_core = init(p_menu_func);
    
    ret = setjmp(train_env);
    if(ret != 1)
        run(p_core, p_menu_func);

    destroy(p_core, p_menu_func);

    return 0;
}